package edu.ncst.baseweb.dao;

import edu.ncst.baseweb.common.RequestPage;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.math.BigInteger;
import java.util.Date;

//借用记录兼借用申请表
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "borrow_record")
public class BorrowRecord extends RequestPage {
    @TableId
    private Integer id;
    //借用人id
    @TableField(value = "user_id")
    private Integer userId;
    //借用的设备id
    @TableField(value = "equ_id")
    private Integer equId;
    //设备名称
    @TableField(value = "equ_name")
    private String equName;
    //预计归还时间
    @TableField(value = "etime")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date etime;
    //审核答复时间
    @TableField(value = "atime")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date atime;
    //答复
    @TableField(value = "answer")
    private String answer;
    //借用申请时间
    @TableField(value = "apply_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date applyTime;
    //借用理由
    @TableField(value = "text")
    private String text;
    //借用过程状态（审核中，已拒绝，已通过，已归还）
    @TableField(value = "state")
    private Integer state;
    public static final String COL_APPLY_TIME = "apply_time";

    public static final String COL_EQU_NAME = "equ_name";
    //设备名称
    //类型名称
    private transient String className;
    //设备编号
    private transient String equCode;
    //设备地址
    private transient String place;
    //规格型号
    private transient String specification;
    //技术参数
    private transient String tparameter;
    //标定参数
    private transient String cparameter;
    //用户名称
    private transient String userName;
    //学号/工号
    private transient BigInteger userNumber;
    //审核结果是通过还是返回的变量
    private transient String approve;




}
